const ProductService = require('../../service/web/ProductService')

const ProductController = {
    getList: async (req, res) => {
        const result = await ProductService.getList()
        if (result.length !== 0) {
            res.send({
                code: 200,
                msg: '获取成功',
                data: result
            })
        }
        else {
            res.send({
                code: 200,
                msg: '暂无数据',
            })
        }
    }
}

module.exports = ProductController